package com.zjcode.oa.service;

import com.chinatechstar.component.commons.supports.PageData;
import com.zjcode.oa.mapper.OaJournalAttachmentMapper;
import com.zjcode.oa.model.OaJournalAttachment;
import com.zjcode.oa.model.OaProjectJournal;
import com.zjcode.oa.model.ZjcodeSysUser;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface ProjectJournalService {

    /**
     * 分页获取数据
     * @param pageData
     * @return
     */
    Map<String, Object> listByPage(PageData pageData);

    /**
     * 新建
     *
     * @param record
     * @return
     */
    int insert(OaProjectJournal record);

    /**
     * 批量插入
     * @param list
     * @return
     */
    int insertList(List<OaProjectJournal> list);

    /**
     * 按照日期范围,获取制定创建这的日志
     *
     * @param minRecordDatetime
     * @param maxRecordDatetime
     * @param createBy
     * @return
     */
    List<OaProjectJournal> selectAllJournalBy(Date minRecordDatetime,
                                              Date maxRecordDatetime,
                                              String createBy);

    /**
     * 按照id删除
     *
     * @param id
     * @return
     */
    int delById(String id);


    /**
     * 获取所有的开发人员
     * @return
     */
    List<ZjcodeSysUser> selectAllDevelopers();

    /**
     * 写入日志附件
     * @param attachments 附件列表
     * @return
     */
    int insertAttachments(List<OaJournalAttachment> attachments);
}
